//
//  CustomerItem.swift
//  account
//
//  Created by Qingke on 16/4/25.
//  Copyright © 2016年 Qingke. All rights reserved.
//

import UIKit
class CustomerLtem:NSObject ,NSCoding {
    var itemName : String?
    var image: UIImage?
    init(itemName: String, image: UIImage){
        self.itemName = itemName
        self.image = image
        super.init()
    }
    
    
    func encodeWithCoder(aCoder: NSCoder) {
        aCoder.encodeObject(itemName, forKey: "itemName")
        aCoder.encodeObject(image, forKey: "image")
    }
    required init?(coder aDecoder: NSCoder) {
        self.itemName = aDecoder.decodeObjectForKey("itemName") as? String ?? "没有啊"
        self.image = aDecoder.decodeObjectForKey("image") as? UIImage 
        
    }
}
